<!DOCTYPE html>
<html>
<head>
   <meta charset="utf-8"> 
   <title>Bootstrap 实例 - 嵌套列</title>
   <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">  
   
   <style type="text/css">
      body{
         padding-top: 60px;
      }

    /*  左侧导航栏*/
    .sidebar{
      position: fixed;
      top: 50px;
      left: 0;
      bottom: 0;
      display: block;
      border: 1px solid #eee;
      padding: 20px;
      z-index: 1000;
      overflow-x: hidden;
      overflow-y: auto;
      background-color: #ddd;
    }

    .nav-sidebar{
      margin-right: -21px;
      margin-bottom: 20px;
      margin-left: -20px;
    }

    .nav-sidebar > li > a {
      padding-right: 20px;
      padding-left: 20px;
    }

    .nav-sidebar > .active > a,
    .nav-sidebar > .active > a:hover,
    .nav-sidebar > .active > a:focus{
      color: #fff;
      background-color: #428bca;
    }
   </style>
</head>
<body>
<!--导航条-->
<nav class="navbar navbar-inverse navbar-fixed-top">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                    data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">管理系统</a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                <li class="active"><a href="#">首页 <span class="sr-only">(current)</span></a></li>
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
                       aria-expanded="false">功能 <span class="caret"></span></a>
                    <ul class="dropdown-menu">
                        <li>
                            <small>业务功能</small>
                        </li>
                        <li><a href="#">信息建立</a></li>
                        <li><a href="#">信息查询</a></li>
                        <li><a href="#">信息管理</a></li>
                        <li role="separator" class="divider"></li>
                        <li>
                            <small>系统功能</small>
                        </li>
                        <li><a href="#">设置</a></li>
                    </ul>
                </li>
                <li><a href="#">帮助</a></li>
            </ul>



            <li> <!-- 搜索框 如何居右?  -->
              <form method="post" action="/searc/" class="navbar-form navbar-right" rol="search">
                {% csrf_token %}
                <div class="form-group" >
                  <input name='q' type="text" class="form-control" placeholder="请输入关键词" />
                </div>
                <button type="submit" class="btn btn-default">搜 索</button>
            </form>
           </li>




        </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->
</nav>

<div class="container-fluid">
    <div class="row">
      <!-- 左侧导航栏 -->
      <div class="col-sm-3 col-md-2 sidebar">
         <ul class="nav nav-sidebar">
            <li class="active"><a href='#'>首页</a></li>
         </ul>

         <ul class="nav nav-sidebar">
           <li><a href="#">信息建立</a></li>
           <li><a href="#">信息查询</a></li>
           <li><a href="#">信息管理</a></li>
         </ul>

         <ul class="nav nav-sidebar">
            <li><a href="#">设置</a></li>
            <li><a href="#">帮助</a></li>
         </ul>
      </div>

     <!--  右侧面板 -->
     <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
         <h1>控制面板</h1>
     </div>
    </div>
</div>
<script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>

</body>
</html>